package com.lsh.util;

import org.springframework.stereotype.Component;

/**
 * @author Administrator
 * @date 2019/10/01 13:24
 */

public class PraiseRedisUtil {

    public static final String PRAISE_COMMENT_KEY = "LinSiHaoBlog.praiseService.comment.id.key";
    public static final String PRAISE_COMMENT_USER_ID_KEY = "LinSiHaoBlog.praiseService.user.id.key::";
    public static final String PRAISE_COMMENT_USER_LIKE_MAP = "LinSiHaoBlog.praiseService.comment.user.like.map";
    public static final String PRAISE_COMMENT_USER_LIKE_COUNT = "LinSiHaoBlog.praiseService.comment.user.like.count";

    /**
     * 根据PRAISE_COMMENT_USER_ID_KEY的名截取出commentId
     * @param commentKey
     * @return
     */
    public static String getPraiseCommentId(String commentKey){
        String commentId = commentKey.substring(commentKey.indexOf("::") + 1);
        return commentId;
    }


}
